import "./HomeSwiper.scss";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Input } from "antd";

export class HomeSearch extends Component {
    constructor() {
        super();
        this.state = {
            tips: "",
        };
    }
    static propTypes = {
        tips: PropTypes.string,
    };
    static defaultProps = {
        tips: "",
    };
    UNSAFE_componentWillMount(){
        this.setState({
            tips: this.props.tips,
        });
    }
    UNSAFE_componentWillReceiveProps(props) {
        this.setState({
            tips: props.tips,
        });
    }
    render() {
        const { tips } = this.state;
        return (
            <>
                <Input className="mt-10" placeholder={tips} disabled={true} />
            </>
        );
    }
}

export default HomeSearch;
